package socio;

public class Entity {
	private long id;
	private String name;
	protected String ip;
	protected int port;

	public void setId(long id) {
		this.id = id;
	}

	public long getId() {
		return id;
	}

	public void print() {
		System.out.println("I have no name");
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof Entity))
			return false;
		Entity e = (Entity) obj;
		return this.id == e.id;
	}
}
